import Vue from 'vue'
import Router from 'vue-router'
import Home from './components/tab/home'
import Search from './components/tab/search'
import Order from './components/tab/order'
import User from './components/tab/user'
import UserInfo from './components/user/UserInfo'
import Password from './components/user/Password'
import Phone from './components/user/phone'
import Username from './components/user/Username'
import Login from './components/log/login'
import Address from './components/address/address'
import AddressEdit from './components/address/AddressEdit'
import ShopInfo from './components/shop/shopInfo'
import Pay from './components/pay/pay'

Vue.use(Router)

export default new Router({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [{
        path: '/',
        redirect: '/home'
    }, {
        path: '/home',
        component: Home
    }, {
        path: '/search',
        component: Search
    }, {
        path: '/order',
        component: Order
    }, {
        path: '/user',
        component: User
    }, {
        path: '/user/userInfo',
        component: UserInfo
    }, {
        path: '/user/password',
        component: Password
    }, {
        path: '/user/phone',
        component: Phone
    }, {
        path: '/user/username',
        component: Username
    }, {
        path: '/login',
        component: Login
    }, {
        path: '/address',
        component: Address
    }, {
        path: '/address/addressEdit/:id',
        component: AddressEdit
    }, {
        path: '/shopInfo/:id',
        component: ShopInfo
    }, {
        path: '/pay',
        component: Pay
    }]
})